﻿using ConfExpert.Forms.Base;
using DevExpress.Utils;
using DevTeam;

using System;
using System.Data;
using System.Drawing;

namespace ConfExpert.Forms.Depo.Kauf
{
    public partial class YikamaSonuclar : XForm
    {
        private string Idxs { get; set; }
        private int CustomerId { get; set; }
        public YikamaSonuclar(string Idxs,int CustomerId)
        {
            InitializeComponent();
            this.Idxs = Idxs;
            this.CustomerId = CustomerId;
        }

        private void Sonuclar_Load(object sender, EventArgs e)
        {
            gv.Init("GetCekmeTestleriByOrders", Idxs,CustomerId);
            
            
            gv.FormatAsNumber(1, "Qty");
            gv.AddSummary("Qty");
            gv.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;
            gv.MoveLast();
            gv.BestFitColumns();

            gv.RowCellStyle += gridView1_RowCellStyle;
        }

        void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
        {
            if (e.Column.FieldName == "RollId")
                e.Appearance.Font = new Font(AppearanceObject.DefaultFont, FontStyle.Bold);
        }


    }
}
